define(['text!./message.html', 'css!./message.css'], function( html) {
	avalon.templateCache['message']=html;
	var vm = avalon.define({
	    $id: "message",
	    back:function(){
	    	Router.go('/Home/Home');
	    },
	    list:[],
	    getData:function(){
	    	var user = JSON.parse(getstorage('user'))
			httpPost('measuremsg/getUserMeasureMsgList', {
				userId: user.idu,
				currentPageIndex:1,
			}).done(function(data) {
				if("200" == data.code) {
					vm.list = data.items;
				} else {
					msgbox('提示', data.msg);
				}
			});
	   },
	   detail:function(id){
	   	Router.go('/detail/detail',JSON.stringify(id));
	   },
	   init:function(){
	   	vm.getData();
	   }
  });
});